import java.util.*;
// 注意类名必须为 Main, 不要有任何 package xxx 信息
public class Main2 {
    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        ArrayList<Character> list = new ArrayList<>();
        String s1 = in.nextLine();
        String s2 = in.nextLine();
        for (int i = 0; i < s1.length();i++) {
            char ch = s1.charAt(i);
            if(!s2.contains(ch+"")) {
                list.add(ch);
            }
        }
        for(int i = 0;i < list.size();i++) {
            System.out.print(list.get(i));
        }
    }
}